// import Vue from 'vue'
// import VueRouter from 'vue-router'

// Vue.use(VueRouter)

const routes = [
    {
        path: "/workbench",
        name: "工作台",
        component: () => import('../../views/Home/children/workbench.vue'),
        icon: "el-icon-cpu",
        meta: {
            jurisdiction: ['visitor', 'admin']
        },
    }, {
        path: "home/article",
        name: "文章管理",
        component: () => import('../../views/Home/children/article'),
        icon: "el-icon-platform-eleme",
        meta: {
            jurisdiction: ['visitor', 'admin']
        },
        children: [{
                path: "/article/allArticle",
                name: "所有文章",
                component: () => import('../../views/Home/children/article/allArticle.vue'),
                icon: "el-icon-eleme",
                meta: {
                    jurisdiction: ['visitor', 'admin']
                },
            },
            {
                path: "/article/classify",
                name: "分类管理",
                component: () => import('../../views/Home/children/article/classify.vue'),
                icon: "el-icon-delete-solid",
                meta: {
                    jurisdiction: ['visitor','admin']
                },
            },
            {
                path: "/article/tag",
                name: "标签管理",
                component: () => import('../../views/Home/children/article/tag.vue'),
                icon: "el-icon-delete",
                meta: {
                    jurisdiction: ['visitor', 'admin']
                },
            },
        ]
    },
    {
        path: "/page",
        name: "页面管理",
        component: () => import('../../views/Home/children/page.vue'),
        icon: "el-icon-more",
        meta: {
            jurisdiction: ['visitor', 'admin']
        },
    },
    {
        path: "/knowledge",
        name: "知识小册",
        component: () => import('../../views/Home/children/knowledge.vue'),
        icon: "el-icon-user",
        meta: {
            jurisdiction: ['visitor', 'admin']
        },
    },
    {
        path: "/poster",
        name: "海报管理",
        component: () => import('../../views/Home/children/poster.vue'),
        icon: "el-icon-s-goods",
        meta: {
            jurisdiction: ['admin']
        },
    },
    {
        path: "/comment",
        name: "评论管理",
        component: () => import('../../views/Home/children/comment.vue'),
        icon: "el-icon-setting",
        meta: {
            jurisdiction: ['visitor', 'admin']
        },
    },
    {
        path: "/mail",
        name: "邮件管理",
        component: () => import('../../views/Home/children/mail.vue'),
        icon: "el-icon-phone",
        meta: {
            jurisdiction: ['admin']
        },
    },
    {
        path: "/file",
        name: "文件管理",
        component: () => import('../../views/Home/children/file.vue'),
        icon: "el-icon-user-solid",
        meta: {
            jurisdiction: ['admin','visitor']
        },
    },
    {
        path: "/searchHistory",
        name: "搜索历史",
        component: () => import('../../views/Home/children/searchHistory.vue'),
        icon: "el-icon-video-camera",
        meta: {
            jurisdiction: ['visitor', 'admin']
        },
    },
    {
        path: "/accessStatistics",
        name: "访问统计",
        component: () => import('../../views/Home/children/accessStatistics.vue'),
        icon: "el-icon-s-tools",
        meta: {
            jurisdiction: ['admin']
        },
    },
    {
        path: "/userControl",
        name: "用户管理",
        component: () => import('../../views/Home/children/userControl.vue'),
        icon: "el-icon-notebook-2",
        meta: {
            jurisdiction: ['admin']
        },
    },

    {
        path: "/systemSetup",
        name: "系统设置",
        component: () => import('../../views/Home/children/systemSetup.vue'),
        icon: "el-icon-s-grid",
        meta: {
            jurisdiction: ['admin']
        },
    },
    {
        path:"/",
        redirect: "/workbench",
        meta: {
            jurisdiction: ['visitor', 'admin']
        },
    },
]
export default routes